<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-cart-edit" th:object="${cart}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">店铺id：</label>
				<div class="col-sm-8">
					<input id="shopId" name="shopId" th:field="*{shopId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">店铺名：</label>
				<div class="col-sm-8">
					<input id="shopName" name="shopName" th:field="*{shopName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商品id：</label>
				<div class="col-sm-8">
					<input id="goodId" name="goodId" th:field="*{goodId}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商品名：</label>
				<div class="col-sm-8">
					<input id="goodName" name="goodName" th:field="*{goodName}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商品规格尺码：</label>
				<div class="col-sm-8">
					<input id="goodStandard" name="goodStandard" th:field="*{goodStandard}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商品价格：</label>
				<div class="col-sm-8">
					<input id="goodPrice" name="goodPrice" th:field="*{goodPrice}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">商品折扣价：</label>
				<div class="col-sm-8">
					<input id="goodDisprice" name="goodDisprice" th:field="*{goodDisprice}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">购买数量：</label>
				<div class="col-sm-8">
					<input id="num" name="num" th:field="*{num}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">总价：</label>
				<div class="col-sm-8">
					<input id="totalPrice" name="totalPrice" th:field="*{totalPrice}" class="form-control" type="text">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/cart";
		$("#form-cart-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			}
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-cart-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
